<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/12/4
 * Time: 17:18
 */
session_start();
if (isset($_SESSION['username'])){
    echo json_encode(array('result'=>'success','username'=>$_SESSION['username']));
}else{
    echo json_encode(array('result'=>'get username fail!'));
}
session_destroy();